home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing;
-
- import com.sun.java.accessibility.Accessible;
- import com.sun.java.accessibility.AccessibleContext;
- import java.awt.AWTError;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Dimension;
- import java.awt.LayoutManager;
-
- public class Box extends Container implements Accessible {
- protected AccessibleContext accessibleContext = null;
-
- public Box(int axis) {
- super.setLayout(new BoxLayout(this, axis));
- }
-
- public static Component createGlue() {
- return new Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(32767, 32767));
- }
-
- public static Box createHorizontalBox() {
- return new Box(0);
- }
-
- public static Component createHorizontalGlue() {
- return new Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(32767, 0));
- }
-
- public static Component createHorizontalStrut(int width) {
- return new Filler(new Dimension(width, 0), new Dimension(width, 0), new Dimension(width, 32767));
- }
-
- public static Component createRigidArea(Dimension d) {
- return new Filler(d, d, d);
- }
-
- public static Box createVerticalBox() {
- return new Box(1);
- }
-
- public static Component createVerticalGlue() {
- return new Filler(new Dimension(0, 0), new Dimension(0, 0), new Dimension(0, 32767));
- }
-
- public static Component createVerticalStrut(int height) {
- return new Filler(new Dimension(0, height), new Dimension(0, height), new Dimension(32767, height));
- }
-
- public AccessibleContext getAccessibleContext() {
- if (this.accessibleContext == null) {
- this.accessibleContext = new AccessibleBox(this);
- }
-
- return this.accessibleContext;
- }
-
- public void setLayout(LayoutManager l) {
- throw new AWTError("Illegal request");
- }
- }
-